package com.security.manage.search.repository;

import com.security.manage.search.model.RegistryInfo;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.transaction.annotation.Transactional;

import java.time.LocalDateTime;
import java.util.List;

public interface RegistryInfoRepository extends JpaRepository<RegistryInfo,Long>, JpaSpecificationExecutor<RegistryInfo> {
    RegistryInfo findFirst1ByUserId(Long userId, Sort sort);
    List<RegistryInfo> findByUserId(Long userId);
    @Transactional
    void removeAllByUserId(Long userId);
}
